import 'package:enterprise_v6_app/app/core/http/http.dart';
import 'package:enterprise_v6_app/app/core/utils/interface.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/get_tb_base_risk_events_by_id_entity.dart';
import 'package:get/get.dart';

class RiskEventDetailsController extends GetxController {
  /// 请求参数
  Map<String, dynamic> queryParameters = {};
  ///获取相应数据
  GetTbBaseRiskEventsByIdEntity? data ;
  @override
  void onInit() {
    super.onInit();
    getTbBaseRiskUnitById();
  }
  getTbBaseRiskUnitById() async {
    queryParameters['id'] = Get.arguments ;
    final res = await HttpUtil()
        .generateGetRequest<GetTbBaseRiskEventsByIdEntity>(
      Interface.getTbBaseRiskEventsById,
      queryParameters: queryParameters,
    )
        .execute();
    res.onSuccess((result) {
      if (result.data != null) {
        data = result.data!;
      }
    });
    update();
  }
}

